<?php

/**
 * Test helper
 */
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'TestHelper.php';

if (!defined('PHPUnit_MAIN_METHOD')) {
    define('PHPUnit_MAIN_METHOD', 'SmartL_AllTests::main');
}

require_once 'SmartL/ConfigTest.php';
require_once 'SmartL/Application/AllTests.php';
require_once 'SmartL/Doctrine/AllTests.php';
require_once 'SmartL/Zend/AllTests.php';
require_once 'SmartL/DataBinderTest.php';
require_once 'SmartL/ProfilerTest.php';
require_once 'SmartL/DatabaseManagerTest.php';
require_once 'SmartL/DatabaseManager/AllTests.php';
require_once 'SmartL/DataBinder/DataAdapter/AllTests.php';

class SmartL_AllTests extends PHPUnit_Framework_TestSuite
{
	public static function main()
	{
		PHPUnit_TextUI_TestRunner::run(self::suite());
	}

	public static function suite()
	{
        $suite = new PHPUnit_Framework_TestSuite('Smart Library - SmartL');
        $suite->addTestSuite('SmartL_ConfigTest');
        $suite->addTestSuite('SmartL_DataBinderTest');
        $suite->addTestSuite('SmartL_ProfilerTest');
        $suite->addTestSuite('SmartL_DatabaseManagerTest');
        $suite->addTestSuite(SmartL_Application_AllTests::suite());
        $suite->addTestSuite(SmartL_Doctrine_AllTests::suite());
        $suite->addTestSuite(SmartL_Zend_AllTests::suite());
        $suite->addTestSuite(SmartL_DatabaseManager_AllTests::suite());
        $suite->addTestSuite(SmartL_DataBinder_DataAdapter_AllTests::suite());

        return $suite;
	}
}

if (PHPUnit_MAIN_METHOD == 'SmartL_AllTests::main') {
    SmartL_AllTests::main();
}